﻿//------------------------------------------------------------------------------------------------- 
// <copyright file="IResultValidator.cs" company="Numbrella foundation">
// Copyright (c) Numbrella foundation. All rights reserved.
// </copyright>
//-------------------------------------------------------------------------------------------------

namespace Numbrella.Core
{
	/// <summary>
	/// Represents validation algorithm for task result.
	/// </summary>
	/// <typeparam name="TResultContents">Type of task result contents.</typeparam>
	public interface IResultValidator<TResultContents>
	{
		/// <summary>
		/// Implement this method to check if given result is valid for task with given identifier.
		/// </summary>
		/// <param name="result">Task result.</param>
		/// <returns>True if result is valid; otherwise, false.</returns>
		bool IsCorrect(TaskResult<TResultContents> result);
	}
}
